﻿using Microsoft.Extensions.DependencyInjection;

namespace Sdari.Api.Services
{
    public static class ServicesExtensions
    {
        /// <summary>
        ///     写入Service的Extension，防止直接创建Service实例
        /// </summary>
        /// <param name="services"></param>
        /// <returns></returns>
        public static IServiceCollection AddTokenServices(this IServiceCollection services)
        {
            return services
                //Todo 应该是单例，考虑修改设计模式
                //Todo 能不能避免使用实例类
                .AddScoped<ITokenService, TokenService>();
        }
    }
}
